import request from '@/utils/request'
// 获取所有组织架构列表
export function reqGetDepartments() {
  return request({
    url: '/company/department',
    method: 'get'
  })
}
// 删除单个部门
export function reqdelDepartments(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'delete'
  })
}
export function reqAddDepots(data) {
  return request({
    url: '/company/department',
    method: 'post',
    data
  })
}

// 获取部门详情
export function reqGetDepotInfo(id) {
  return request({
    url: `/company/department/${id}`,
    method: 'get'
  })
}
// 根据id更新部门
export function reqChangeDportments(form) {
  return request({
    url: `/company/department/${form.id}`,
    method: 'put',
    data: form
  })
}
